3.1.76 \(\int \frac {1}{a+b \cos ^8(x)} \, dx\) [76]

Optimal. Leaf size=245 \[ \frac {\text {ArcTan}\left (\frac {\sqrt {\sqrt [4]{-a}-\sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}-\sqrt [4]{b}}}+\frac {\text {ArcTan}\left (\frac {\sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}}}+\frac {\text {ArcTan}\left (\frac {\sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}}}+\frac {\text {ArcTan}\left (\frac {\sqrt {\sqrt [4]{-a}+\sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+\sqrt [4]{b}}} \]

[Out]

1/4*arctan(cot(x)*((-a)^(1/4)-b^(1/4))^(1/2)/(-a)^(1/8))/(-a)^(7/8)/((-a)^(1/4)-b^(1/4))^(1/2)+1/4*arctan(cot(
x)*((-a)^(1/4)-I*b^(1/4))^(1/2)/(-a)^(1/8))/(-a)^(7/8)/((-a)^(1/4)-I*b^(1/4))^(1/2)+1/4*arctan(cot(x)*((-a)^(1
/4)+I*b^(1/4))^(1/2)/(-a)^(1/8))/(-a)^(7/8)/((-a)^(1/4)+I*b^(1/4))^(1/2)+1/4*arctan(cot(x)*((-a)^(1/4)+b^(1/4)
)^(1/2)/(-a)^(1/8))/(-a)^(7/8)/((-a)^(1/4)+b^(1/4))^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.33, antiderivative size = 245, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3290, 3260, 209} \begin {gather*} \frac {\text {ArcTan}\left (\frac {\sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}}}+\frac {\text {ArcTan}\left (\frac {\sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}}}+\frac {\text {ArcTan}\left (\frac {\sqrt {\sqrt [4]{-a}+\sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+\sqrt [4]{b}}}+\frac {\text {ArcTan}\left (\frac {\sqrt {a \sqrt [4]{b}+(-a)^{5/4}} \cot (x)}{(-a)^{5/8}}\right )}{4 (-a)^{3/8} \sqrt {a \sqrt [4]{b}+(-a)^{5/4}}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Cos[x]^8)^(-1),x]

[Out]

ArcTan[(Sqrt[(-a)^(1/4) - I*b^(1/4)]*Cot[x])/(-a)^(1/8)]/(4*(-a)^(7/8)*Sqrt[(-a)^(1/4) - I*b^(1/4)]) + ArcTan[
(Sqrt[(-a)^(1/4) + I*b^(1/4)]*Cot[x])/(-a)^(1/8)]/(4*(-a)^(7/8)*Sqrt[(-a)^(1/4) + I*b^(1/4)]) + ArcTan[(Sqrt[(
-a)^(1/4) + b^(1/4)]*Cot[x])/(-a)^(1/8)]/(4*(-a)^(7/8)*Sqrt[(-a)^(1/4) + b^(1/4)]) + ArcTan[(Sqrt[(-a)^(5/4) +
 a*b^(1/4)]*Cot[x])/(-a)^(5/8)]/(4*(-a)^(3/8)*Sqrt[(-a)^(5/4) + a*b^(1/4)])

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 3260

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(-1), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist
[ff/f, Subst[Int[1/(a + (a + b)*ff^2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x]

Rule 3290

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^(n_))^(-1), x_Symbol] :> Module[{k}, Dist[2/(a*n), Sum[Int[1/(1 - Si
n[e + f*x]^2/((-1)^(4*(k/n))*Rt[-a/b, n/2])), x], {k, 1, n/2}], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[n/2]

Rubi steps

\begin {align*} \int \frac {1}{a+b \cos ^8(x)} \, dx &=\frac {\int \frac {1}{1-\frac {\sqrt [4]{b} \cos ^2(x)}{\sqrt [4]{-a}}} \, dx}{4 a}+\frac {\int \frac {1}{1-\frac {i \sqrt [4]{b} \cos ^2(x)}{\sqrt [4]{-a}}} \, dx}{4 a}+\frac {\int \frac {1}{1+\frac {i \sqrt [4]{b} \cos ^2(x)}{\sqrt [4]{-a}}} \, dx}{4 a}+\frac {\int \frac {1}{1+\frac {\sqrt [4]{b} \cos ^2(x)}{\sqrt [4]{-a}}} \, dx}{4 a}\\ &=-\frac {\text {Subst}\left (\int \frac {1}{1+\left (1-\frac {\sqrt [4]{b}}{\sqrt [4]{-a}}\right ) x^2} \, dx,x,\cot (x)\right )}{4 a}-\frac {\text {Subst}\left (\int \frac {1}{1+\left (1-\frac {i \sqrt [4]{b}}{\sqrt [4]{-a}}\right ) x^2} \, dx,x,\cot (x)\right )}{4 a}-\frac {\text {Subst}\left (\int \frac {1}{1+\left (1+\frac {i \sqrt [4]{b}}{\sqrt [4]{-a}}\right ) x^2} \, dx,x,\cot (x)\right )}{4 a}-\frac {\text {Subst}\left (\int \frac {1}{1+\left (1+\frac {\sqrt [4]{b}}{\sqrt [4]{-a}}\right ) x^2} \, dx,x,\cot (x)\right )}{4 a}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}}}+\frac {\tan ^{-1}\left (\frac {\sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}}}+\frac {\tan ^{-1}\left (\frac {\sqrt {\sqrt [4]{-a}+\sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+\sqrt [4]{b}}}+\frac {\tan ^{-1}\left (\frac {\sqrt {(-a)^{5/4}+a \sqrt [4]{b}} \cot (x)}{(-a)^{5/8}}\right )}{4 (-a)^{3/8} \sqrt {(-a)^{5/4}+a \sqrt [4]{b}}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
time = 0.29, size = 172, normalized size = 0.70 \begin {gather*} 8 \text {RootSum}\left [b+8 b \text {$\#$1}+28 b \text {$\#$1}^2+56 b \text {$\#$1}^3+256 a \text {$\#$1}^4+70 b \text {$\#$1}^4+56 b \text {$\#$1}^5+28 b \text {$\#$1}^6+8 b \text {$\#$1}^7+b \text {$\#$1}^8\&,\frac {2 \text {ArcTan}\left (\frac {\sin (2 x)}{\cos (2 x)-\text {$\#$1}}\right ) \text {$\#$1}^3-i \log \left (1-2 \cos (2 x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}^3}{b+7 b \text {$\#$1}+21 b \text {$\#$1}^2+128 a \text {$\#$1}^3+35 b \text {$\#$1}^3+35 b \text {$\#$1}^4+21 b \text {$\#$1}^5+7 b \text {$\#$1}^6+b \text {$\#$1}^7}\&\right ] \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*Cos[x]^8)^(-1),x]

[Out]

8*RootSum[b + 8*b*#1 + 28*b*#1^2 + 56*b*#1^3 + 256*a*#1^4 + 70*b*#1^4 + 56*b*#1^5 + 28*b*#1^6 + 8*b*#1^7 + b*#
1^8 & , (2*ArcTan[Sin[2*x]/(Cos[2*x] - #1)]*#1^3 - I*Log[1 - 2*Cos[2*x]*#1 + #1^2]*#1^3)/(b + 7*b*#1 + 21*b*#1
^2 + 128*a*#1^3 + 35*b*#1^3 + 35*b*#1^4 + 21*b*#1^5 + 7*b*#1^6 + b*#1^7) & ]

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.46, size = 76, normalized size = 0.31

method result size
default \(\frac {\munderset {\textit {\_R} =\RootOf \left (a \,\textit {\_Z}^{8}+4 a \,\textit {\_Z}^{6}+6 a \,\textit {\_Z}^{4}+4 a \,\textit {\_Z}^{2}+a +b \right )}{\sum }\frac {\left (\textit {\_R}^{6}+3 \textit {\_R}^{4}+3 \textit {\_R}^{2}+1\right ) \ln \left (\tan \left (x \right )-\textit {\_R} \right )}{\textit {\_R}^{7}+3 \textit {\_R}^{5}+3 \textit {\_R}^{3}+\textit {\_R}}}{8 a}\) \(76\)
risch \(\munderset {\textit {\_R} =\RootOf \left (1+\left (16777216 a^{8}+16777216 a^{7} b \right ) \textit {\_Z}^{8}+1048576 a^{6} \textit {\_Z}^{6}+24576 a^{4} \textit {\_Z}^{4}+256 a^{2} \textit {\_Z}^{2}\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{2 i x}+\left (\frac {4194304 i a^{8}}{b}+4194304 i a^{7}\right ) \textit {\_R}^{7}+\left (-\frac {524288 a^{7}}{b}-524288 a^{6}\right ) \textit {\_R}^{6}+\left (\frac {196608 i a^{6}}{b}-65536 i a^{5}\right ) \textit {\_R}^{5}+\left (-\frac {24576 a^{5}}{b}+8192 a^{4}\right ) \textit {\_R}^{4}+\left (\frac {3072 i a^{4}}{b}+1024 i a^{3}\right ) \textit {\_R}^{3}+\left (-\frac {384 a^{3}}{b}-128 a^{2}\right ) \textit {\_R}^{2}+\left (\frac {16 i a^{2}}{b}-16 i a \right ) \textit {\_R} -\frac {2 a}{b}+1\right )\) \(193\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+b*cos(x)^8),x,method=_RETURNVERBOSE)

[Out]

1/8/a*sum((_R^6+3*_R^4+3*_R^2+1)/(_R^7+3*_R^5+3*_R^3+_R)*ln(tan(x)-_R),_R=RootOf(_Z^8*a+4*_Z^6*a+6*_Z^4*a+4*_Z
^2*a+a+b))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cos(x)^8),x, algorithm="maxima")

[Out]

integrate(1/(b*cos(x)^8 + a), x)

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 665467 vs. \(2 (165) = 330\).
time = 6.45, size = 665467, normalized size = 2716.19 \begin {gather*} \text {too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cos(x)^8),x, algorithm="fricas")

[Out]

-1/384*sqrt(1/2)*sqrt((-I*sqrt(3) + 1)*(((a^3*sqrt(-(2*a*b*sqrt(-b/a) + a*b - b^2)/((a^6 + 2*a^5*b + a^4*b^2)*
sqrt(-b/a))) + a^2*b*sqrt(-(2*a*b*sqrt(-b/a) + a*b - b^2)/((a^6 + 2*a^5*b + a^4*b^2)*sqrt(-b/a))) - 3*a)*sqrt(
-b/a) - b)^2*a/((a^3 + a^2*b)^2*b) - 3*(2*a^2*b*sqrt(-(2*a*b*sqrt(-b/a) + a*b - b^2)/((a^6 + 2*a^5*b + a^4*b^2
)*sqrt(-b/a))) + (2*a^3*sqrt(-(2*a*b*sqrt(-b/a) + a*b - b^2)/((a^6 + 2*a^5*b + a^4*b^2)*sqrt(-b/a))) - 3*a)*sq
rt(-b/a) - b)/((a^5 + a^4*b)*sqrt(-b/a)))/(-1/1572864*(2*a^2*b*sqrt(-(2*a*b*sqrt(-b/a) + a*b - b^2)/((a^6 + 2*
a^5*b + a^4*b^2)*sqrt(-b/a))) + (2*a^3*sqrt(-(2*a*b*sqrt(-b/a) + a*b - b^2)/((a^6 + 2*a^5*b + a^4*b^2)*sqrt(-b
/a))) - 3*a)*sqrt(-b/a) - b)*((a^3*sqrt(-(2*a*b*sqrt(-b/a) + a*b - b^2)/((a^6 + 2*a^5*b + a^4*b^2)*sqrt(-b/a))
) + a^2*b*sqrt(-(2*a*b*sqrt(-b/a) + a*b - b^2)/((a^6 + 2*a^5*b + a^4*b^2)*sqrt(-b/a))) - 3*a)*sqrt(-b/a) - b)*
a/((a^5 + a^4*b)*(a^3 + a^2*b)*b) + 1/524288*(2*a^2*b*sqrt(-(2*a*b*sqrt(-b/a) + a*b - b^2)/((a^6 + 2*a^5*b + a
^4*b^2)*sq ...

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{a + b \cos ^{8}{\left (x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cos(x)**8),x)

[Out]

Integral(1/(a + b*cos(x)**8), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cos(x)^8),x, algorithm="giac")

[Out]

integrate(1/(b*cos(x)^8 + a), x)

________________________________________________________________________________________

Mupad [B]
time = 3.42, size = 216, normalized size = 0.88 \begin {gather*} \sum _{k=1}^8\ln \left ({\mathrm {root}\left (16777216\,a^7\,b\,d^8+16777216\,a^8\,d^8+1048576\,a^6\,d^6+24576\,a^4\,d^4+256\,a^2\,d^2+1,d,k\right )}^4\,a^5\,b^5\,\left ({\mathrm {root}\left (16777216\,a^7\,b\,d^8+16777216\,a^8\,d^8+1048576\,a^6\,d^6+24576\,a^4\,d^4+256\,a^2\,d^2+1,d,k\right )}^2\,a^2\,64+1\right )\,\left (\mathrm {root}\left (16777216\,a^7\,b\,d^8+16777216\,a^8\,d^8+1048576\,a^6\,d^6+24576\,a^4\,d^4+256\,a^2\,d^2+1,d,k\right )\,a\,\mathrm {tan}\left (x\right )\,8-1\right )\,4096\right )\,\mathrm {root}\left (16777216\,a^7\,b\,d^8+16777216\,a^8\,d^8+1048576\,a^6\,d^6+24576\,a^4\,d^4+256\,a^2\,d^2+1,d,k\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a + b*cos(x)^8),x)

[Out]

symsum(log(4096*root(16777216*a^7*b*d^8 + 16777216*a^8*d^8 + 1048576*a^6*d^6 + 24576*a^4*d^4 + 256*a^2*d^2 + 1
, d, k)^4*a^5*b^5*(64*root(16777216*a^7*b*d^8 + 16777216*a^8*d^8 + 1048576*a^6*d^6 + 24576*a^4*d^4 + 256*a^2*d
^2 + 1, d, k)^2*a^2 + 1)*(8*root(16777216*a^7*b*d^8 + 16777216*a^8*d^8 + 1048576*a^6*d^6 + 24576*a^4*d^4 + 256
*a^2*d^2 + 1, d, k)*a*tan(x) - 1))*root(16777216*a^7*b*d^8 + 16777216*a^8*d^8 + 1048576*a^6*d^6 + 24576*a^4*d^
4 + 256*a^2*d^2 + 1, d, k), k, 1, 8)

________________________________________________________________________________________